package com.you.tomcat.netty.servlet;

import com.you.tomcat.netty.http.HttpServlet;
import com.you.tomcat.netty.http.MyRequest;
import com.you.tomcat.netty.http.MyResponse;

/**
 * first servlet
 */
public class FirstServlet extends HttpServlet {

    @Override
    public void doGet(MyRequest request, MyResponse response) throws Exception {
        doPost(request, response);
    }

    @Override
    public void doPost(MyRequest request, MyResponse response) throws Exception {
        System.out.println("--------first servlet------");
        //模拟业务处理时间
        //Thread.sleep(5000L);
        response.write("This is first servlet!");
    }
}
